package com.aierkeji.call.cms.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.aierkeji.call.cms.entity.snap.AkjCallUserSnap;

/**
 * 线索分组
 * 
 * @author 陈宇强
 *
 */
@Entity
@Table(name = "akj_call_clue_group")
public class AkjCallClueGroup {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", length = 32)
	private Long id;

	@Column(length = 128)
	private String groupName;

	@Column(columnDefinition = "datetime")
	private Date createdAt;

	@ManyToOne(targetEntity = AkjCallUserSnap.class, cascade = CascadeType.REFRESH, fetch = FetchType.EAGER)
	@JoinColumn(name = "created_by", nullable = true)
	@NotFound(action = NotFoundAction.IGNORE)
	private AkjCallUserSnap createdBy;

	

	@ManyToOne(targetEntity = AkjCallUserSnap.class, cascade = CascadeType.REFRESH, fetch = FetchType.EAGER)
	@JoinColumn(name = "updated_by", nullable = true)
	@NotFound(action = NotFoundAction.IGNORE)
	private AkjCallUserSnap updatedBy;
	
	
	@Column(columnDefinition = "datetime")
	private Date updatedAt;
	

	@Column(name = "is_delete", nullable = false)
	private boolean isDelete = false;

	@Column(nullable = false)
	private Boolean isCheckedError = false;// 是否查错

	@Column(nullable = false)
	private Boolean isCheckedDuplicate = false;// 是否查重
	
	@Column(nullable = true)
	private Boolean isRemove = false;

	public Long getId() {
		return id;
	}


	public void setId(Long id) {
		this.id = id;
	}


	public String getGroupName() {
		return groupName;
	}


	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}


	public Date getCreatedAt() {
		return createdAt;
	}


	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}


	public AkjCallUserSnap getCreatedBy() {
		return createdBy;
	}


	public void setCreatedBy(AkjCallUserSnap createdBy) {
		this.createdBy = createdBy;
	}


	public AkjCallUserSnap getUpdatedBy() {
		return updatedBy;
	}


	public void setUpdatedBy(AkjCallUserSnap updatedBy) {
		this.updatedBy = updatedBy;
	}


	public Date getUpdatedAt() {
		return updatedAt;
	}


	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}


	public boolean isDelete() {
		return isDelete;
	}


	public void setDelete(boolean isDelete) {
		this.isDelete = isDelete;
	}


	public Boolean getIsCheckedError() {
		return isCheckedError;
	}


	public void setIsCheckedError(Boolean isCheckedError) {
		this.isCheckedError = isCheckedError;
	}


	public Boolean getIsCheckedDuplicate() {
		return isCheckedDuplicate;
	}


	public void setIsCheckedDuplicate(Boolean isCheckedDuplicate) {
		this.isCheckedDuplicate = isCheckedDuplicate;
	}


	public Boolean getIsRemove() {
		return isRemove;
	}


	public void setIsRemove(Boolean isRemove) {
		this.isRemove = isRemove;
	}

	
}
